#include<bits/stdc++.h>
using namespace std;
const int N=1e5+8;
int a[N];
int pre[N];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    scanf("%d",&n);
    for(int i=1,v;i<=n;i++){
        scanf("%d",&v);//input
        a[v]++;
    }
    // for(int i=1;i<=n;i++){//qian zhui he
    //     pre[i]+=(a[i]+pre[i-1]);
    // }
    int kill=0,pre=0;//been killed animal
    for(int i=1;i<=N-2;i++){
        if(a[i]!=0){//have this animal
            kill+=min(a[i],pre);
            pre-=min(a[i],pre);
            pre+=a[i];
        }
    }
    printf("%d",n-kill);
    return 0;
}